package com.xjtu.se.homework.client.mainPage.impl;

import com.xjtu.se.homework.client.mainPage.PicDto;
import com.xjtu.se.homework.client.mainPage.PicService;
import com.xjtu.se.homework.client.mainPage.dao.PicDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class Service_solution implements PicService {

    @Resource
    private PicDao picDao;

    @Override
    public boolean uploadFile(PicDto picDto) {
        boolean check = picDao.uploadFile(picDto);
        if(check)   return true;
        return false;
    }

    @Override
    public boolean enterHistory(PicDto picDto) {
        boolean check = picDao.addHistory(picDto);
        if(check)   return true;
        return false;
    }

    @Override
    public boolean enterLog(PicDto picDto) {
        boolean check = picDao.addLog(picDto);
        if(check)   return true;
        return false;
    }
}
